import axios from 'axios';
function selectData(optionsXb) {
    alert(1);
    let optionsXbs = new Array();
    let optionsZjdms = new Array();
    let optionsMzs = new Array();
    let optionsGjs = new Array();

    this.axios.post('t-dictionary/selectList', null
    ).then((res) => {
        if(res.code == '1'){
        for (var obj in res.data) {
            if(res.data[obj].type == 'XB'){
                optionsXbs.push(res.data[obj]);
            }
            if(res.data[obj].type == 'ZJDM'){
                optionsZjdms.push(res.data[obj]);
            }
            if(res.data[obj].type == 'MZ'){
                optionsMzs.push(res.data[obj]);
            }
            if(res.data[obj].type == 'GJ'){
                optionsGjs.push(res.data[obj]);
            }
        }
        this.optionsXb = optionsXbs;
        this.optionsZjdm = optionsZjdm;
        this.optionsMz = optionsMz;
        this.optionsGj = optionsGj;
    }

}).catch((error) => {
        this.$message({
        message: '数据查询失败！'+error,
        type: 'error',
    });
});
    console.log(optionsXbs);
    this.optionsXb = optionsXbs;
}

export {
    selectData
}